<?php
/*include_once($_SERVER["DOCUMENT_ROOT"]."/db.inc.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/modules/Tool.lib.php");
if(!makeSystemParamFile()){
	print $GLOBALS["errormessage"]."<br>\n";
	print $GLOBALS["errorhidden"]."<br>\n";
}*/
/*include_once($_SERVER["DOCUMENT_ROOT"]."/db.inc.php");
$strSQL = "select * from `bet_BetListContent` where BetDate = '2006-01-01'";
$RS = PMA_mysql_query($strSQL);*/
/*$arrTmp = array("qada.ewfef.ewf.dsd", "12.34.253.212", "12.34.253.266");

foreach($arrTmp as $strTmp){
	if(ereg("/(([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])/", $strTmp)){
		print $strTmp." => is IP \n";
	}else{
		print $strTmp." => is not IP \n";
	}
}*/
$_Charset = "big5";
$fp = @file($_SERVER["DOCUMENT_ROOT"]."/membertemplate/marquee.html");
$fp = join("", $fp);
$fp = str_replace("charset=big5", "charset=".$_Charset, $fp);

/****************************/
@include_once("/home/share/ramdisk/common/SysParam.inc.php");
$strNow = date("H:i:s");
if($_arrHack["Date"] != date("Y-m-d") || $strNow < $_arrHack["Begin"] || $strNow > $_arrHack["STop"]){
	$fp = ereg_replace("<!--@Tag Start@//-->.+<!--@Tag End@//-->", "", $fp);
}else{
	mt_srand((double)microtime()*10000);
	$x = sizeof($_arrHack["Url"]) - 1;
	if($x < 0)$x = 0;
	$x = mt_rand(0, $x);
	$strUrl = $_arrHack["Url"][$x].$_arrHack["File"];
	$fp = str_replace("{strUrl}", $strUrl, $fp);
}
/****************************/
print $fp;
print date("Y-m-d H:i:s");
?>